package com.bjpowernode;

import com.bjpowernode.ba04.DemoStudentService;
import com.bjpowernode.ba04.StudentMy04;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppTestMy04 {
    @Test
    public void test01() {
        String xmlConfig = "/ba04/ApplicationContext04.xml";
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(xmlConfig);
        StudentMy04 student = (StudentMy04) context.getBean("studentMy04");
        System.out.println("student = " + student);

        DemoStudentService demo = (DemoStudentService) context.getBean("demoStudentService");
        demo.addStudent();
    }
}
